package com.ktjy.crm.model;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.util.Date;

@Data
@TableName("sys_right")

public class Right {
    @TableId
    @TableField("right_code")
    private String rightCode;  // 编号
    @TableField("right_parent_code")
    private String rightParentCode;  // 父级编号
    @TableField("right_type")
    private String rightType;  // 类型
    @TableField("right_text")
    private String rightText;  // 名称
    @TableField("right_url")
    private String rightUrl;  // url地址
    @TableField("right_tip")
    private String rightTip;  // 说明
    @Version
    private Integer version;  // 版本
    @TableLogic
    @TableField("del")
    private Integer del; // 删除标记

    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    // 构造函数
    public Right() {
    }

    public Right(String rightCode, String rightParentCode, String rightType, String rightText, String rightUrl, String rightTip) {
        this.rightCode = rightCode;
        this.rightParentCode = rightParentCode;
        this.rightType = rightType;
        this.rightText = rightText;
        this.rightUrl = rightUrl;
        this.rightTip = rightTip;
    }

    public Right(String rightParentCode, String rightType, String rightText, String rightUrl, String rightTip) {
        this.rightParentCode = rightParentCode;
        this.rightType = rightType;
        this.rightText = rightText;
        this.rightUrl = rightUrl;
        this.rightTip = rightTip;
    }
}
